s='🧦';T={(0,0)} for i in open(0).read().split()[1:]:T={(x,y)for x,y in{(x+a*(i=s))for x,y in T for a in(-1,1)for b in(-1,1)}if-1